package org.lvgo.builder.demo2;

/**
 * @author lvgo
 * @version 1.0
 * @Description: 8条腿的人装配器
 * @date 18-8-21 下午5:29
 */
public class EightLegPersionDirecotr implements PersonDirector {

    private PersonBuilder personBuilder;

    public EightLegPersionDirecotr(PersonBuilder personBuilder) {
        this.personBuilder = personBuilder;
    }

    @Override
    public Person createPerson() {
        Person person = new Person();
        person.setEyes(personBuilder.buildEyes());
        person.setHair(personBuilder.buildHair());
        person.setLeg(personBuilder.buildLeg());
        return person;
    }
}
